package com.jp.knowledge.my.adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.view.View;

import com.jp.knowledge.R;
import com.jp.knowledge.my.base.RecycleVAdapter;
import com.jp.knowledge.my.base.RecycleVHolder;
import com.jp.knowledge.my.model.DepartmentModel;

import java.util.List;

public class DepartmentAdapter extends RecycleVAdapter<DepartmentModel> {

    public DepartmentAdapter(Context context, @NonNull List<DepartmentModel> list) {
        super(context, list);
    }

    @Override
    public int getLayoutId(int viewType) {
        return R.layout.item_search_data;
    }

    @Override
    public void onBind(RecycleVHolder holder, int position) {
        DepartmentModel model = getData(position);
        holder.getImageView(R.id.item_data_iv_logo).setVisibility(View.GONE);
        holder.setTextView(R.id.item_data_tv_name, model.getName());
    }
}
